import service from "../uitils/request"

export const flowRuleListApi = () => {
    return service({
        url: '/flow/rule/list',
        method: 'GET',
    })
}

export const userApplyPageApi = (params) => {
    return service({
        url: '/flow/query/userApplyPage',
        method: 'GET',
        params
    })
}

export const applyDetailApi = (applyId) => {
    return service({
        url: `/flow/query/apply/${applyId}`,
        method: 'GET',
    })
}

export const auditPageApi = (params) => {
    return service({
        url: '/flow/query/userAuditPage',
        method: 'GET',
        params
    })
}

export const submitApplyApi = (data) => {
    return service({
        url: "/flow/audit/submitApply",
        method: 'POST',
        data
    })
}

export const cancelApplyApi = (applyId) => {
    return service({
        url: '/flow/audit/cancelApply',
        method: 'PUT',
        params: {applyId: applyId}
    })
}

export const submitAuditApi = (data) => {
    return service({
        url: '/flow/audit/submitAudit',
        method: 'POST',
        data
    })
}